package com.dao.c.backend.controller;

import com.dao.c.backend.common.CommonResult;
import com.dao.c.backend.entity.User;
import com.dao.c.backend.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 张幸晔
 * @since 2025-02-22
 */
@RestController
@RequestMapping("/user")
//@CrossOrigin(originPatterns = "*",allowedHeaders = "Authorization",exposedHeaders = "Authorization",allowCredentials = "true")
public class UserController {
    @Autowired
    private IUserService userService;


    @RequestMapping("/login")
    public CommonResult login(User user){
        return userService.login(user);
    }
    @RequestMapping("/sign")
    public CommonResult sign(User user){
        return userService.sign(user);
    }





}
